package com.hyopt.common.log;

import org.apache.commons.lang3.StringUtils;

/**
 * TODO
 *
 * @author crazypenguin
 * @version 1.0.0
 * @createdate 2019/3/26
 */
public enum LogEnum {

    LOGIN_LOGS("loginLogs"),
    PROJECT_LOGS("projectLogs");

    private String logFileName;

    LogEnum(String fileName) {
        this.logFileName = fileName;
    }

    public String getLogFileName() {
        return logFileName;
    }

    public void setLogFileName(String logFileName) {
        this.logFileName = logFileName;
    }

    public static LogEnum getAwardTypeEnum(String value) {
        LogEnum[] arr = values();
        for (LogEnum item : arr) {
            if (null != item && StringUtils.isNotBlank(item.logFileName)) {
                return item;
            }
        }
        return null;
    }
}
